home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5790 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  861 b 

  1. Path: gail.ripco.com!mambuhl
  2. From: mambuhl@ripco.com (Martin Ambuhl)
  3. Newsgroups: comp.lang.c
  4. Subject: Re:I can`t print the date
  5. Date: 21 Feb 1996 04:05:13 GMT
  6. Organization: Ripco Communications, Inc.
  7. Message-ID: <4ge5lp$mh7@gail.ripco.com>
  8. NNTP-Posting-Host: foley.ripco.com
  9.  
  10. asciizero@aol.com (ASCII zero) in <4g5nbf$8s0@newsbf02.news.aol.com>
  11. asks:
  12.  
  13.  
  14. >I am trying to use strftime() to format the date into YY-MM-DD. The format
  15. >seems to be working but I am unable to actually print the formatted
  16. >string. It compiles just fine using gcc. What have I overlooked?
  17.  
  18. You have overlooked allocating any space for
  19.  
  20. > char *str;
  21.  
  22. Either declare it as an array or malloc() some space.
  23.  
  24.                                                                                                             
  25. --
  26. * Martin Ambuhl       net: mambuhl@ripco.com
  27. * Chicago, IL (USA)    
  28.